burst.tracking=burst.tracking||{isInitialHit:!0,lastUpdateTimestamp:0,ajaxUrl:""},burst.cache=burst.cache||{uid:null,fingerprint:null,isUserAgent:null,isDoNotTrack:null,useCookies:null},burst.goals?.active&&(burst.goals.active=burst.goals.active.map(t=>({...t,ID:parseInt(t.ID,10)}))),burst.goals?.completed&&(burst.goals.completed=burst.goals.completed.map(t=>parseInt(t,10)));let pageIsRendered=new Promise(t=>{document.prerendering?document.addEventListener("prerenderingchange",t,{once:!0}):t()}),burst_get_cookie=(burst.goals?.active?.some(t=>!t.page_url||""===t.page_url||t.page_url===burst.options.pageUrl)&&import(burst.goals.scriptUrl).then(t=>t.default()),t=>{var e,r=t+"=";for(e of document.cookie.split(";"))if(0===(e=e.trim()).indexOf(r))return Promise.resolve(e.substring(r.length));return Promise.reject(!1)}),burst_set_cookie=(t,e)=>{let r="";var a="https:"===location.protocol?";secure":"",s=new Date,s=(s.setTime(s.getTime()+864e5*burst.options.cookie_retention_days),";expires="+s.toGMTString());r=r&&";domain="+r,document.cookie=""+t+`=${e};SameSite=Strict${a}${s}${r};path=/`},burst_use_cookies=()=>{var t;return null!==burst.cache.useCookies?burst.cache.useCookies:(t=navigator.cookieEnabled&&!burst.options.cookieless,burst.cache.useCookies=t)};function burst_enable_cookies(){burst.options.cookieless=!1,burst_use_cookies()&&burst_uid().then(t=>burst_set_cookie("burst_uid",t))}let burst_uid=()=>null!==burst.cache.uid?Promise.resolve(burst.cache.uid):burst_get_cookie("burst_uid").then(t=>burst.cache.uid=t).catch(()=>{var t=burst_generate_uid();return burst_set_cookie("burst_uid",t),burst.cache.uid=t}),burst_generate_uid=()=>Array.from({length:32},()=>Math.floor(16*Math.random()).toString(16)).join(""),burst_fingerprint=()=>null!==burst.cache.fingerprint?Promise.resolve(burst.cache.fingerprint):new ThumbmarkJS.Thumbmark({exclude:[],permissions_to_check:["geolocation","notifications","camera","microphone","gyroscope","accelerometer","magnetometer","ambient-light-sensor","background-sync","persistent-storage"]}).get().then(t=>{var t=t.thumbmark,e=t+"|"+[screen.availWidth+"x"+screen.availHeight,screen.width+"x"+screen.height,screen.colorDepth,window.devicePixelRatio||1,navigator.hardwareConcurrency||0,navigator.deviceMemory||0,navigator.maxTouchPoints||0,(new Date).getTimezoneOffset(),navigator.cookieEnabled?"1":"0","undefined"!=typeof Storage?"1":"0","undefined"!=typeof indexedDB?"1":"0",navigator.onLine?"1":"0",navigator.languages?navigator.languages.slice(0,3).join(","):navigator.language,navigator.platform,navigator.oscpu||"",navigator.connection&&navigator.connection.effectiveType||"","ontouchstart"in window?"1":"0",void 0!==window.orientation?"1":"0",window.screen.orientation&&window.screen.orientation.type||""].filter(t=>""!==t).join("|");let r=0;for(let t=0;t(console.error(t),null)),burst_get_time_on_page=()=>{var t;return"undefined"==typeof TimeMe?Promise.resolve(0):(t=TimeMe.getTimeOnCurrentPageInMilliseconds(),TimeMe.resetAllRecordedPageTimes(),TimeMe.initialize({idleTimeoutInSeconds:30}),Promise.resolve(t))},burst_is_user_agent=()=>{var t;return null!==burst.cache.isUserAgent?burst.cache.isUserAgent:(t=/bot|spider|crawl|slurp|mediapartners|applebot|bing|duckduckgo|yandex|baidu|facebook|twitter/i.test(navigator.userAgent),burst.cache.isUserAgent=t)},burst_is_do_not_track=()=>{var t;return null!==burst.cache.isDoNotTrack?burst.cache.isDoNotTrack:burst.options.do_not_track?(t="1"===navigator.doNotTrack||"yes"===navigator.doNotTrack||"1"===navigator.msDoNotTrack||"1"===window.doNotTrack||1===navigator.globalPrivacyControl,burst.cache.isDoNotTrack=t):burst.cache.isDoNotTrack=!1},burst_log_tracking_error=({status:t=0,error:e="",data:r={}})=>{burst.options.debug&&burst.tracking.ajaxUrl&&fetch(burst.tracking.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"burst_tracking_error",status:t,error:e,data:r})})},burst_beacon_request=e=>{var t=new Blob([e],{type:"application/json"});burst.options.debug?fetch(burst.tracking.beacon_url,{method:"POST",body:t,keepalive:!0,headers:{"Content-Type":"application/json"}}).then(t=>{t.ok||burst_log_tracking_error({status:0,error:"sendBeacon failed",data:e})}).catch(t=>{burst_log_tracking_error({status:0,error:t?.message||"sendBeacon failed",data:e})}):navigator.sendBeacon(burst.tracking.beacon_url,t)},burst_api_request=t=>{let a=JSON.stringify(t.data||{});return new Promise(r=>{var t;burst.options.beacon_enabled?(burst_beacon_request(a),r({status:200,data:"ok"})):(t=Math.random().toString(36).substring(2,9),wp.apiFetch({path:"/burst/v1/track/?token="+t,keepalive:!0,method:"POST",data:a}).then(t=>{var e=t.status||200;r({status:e,data:t.data||t}),200!==e&&burst_log_tracking_error({status:e,error:"Non-200 status",data:a})}).catch(t=>{r({status:200,data:"ok"}),burst_log_tracking_error({status:0,error:t?.message||"Burst tracking request failed",data:a})}))})};async function burst_update_hit(t=!1,e=!1){var r;await pageIsRendered,burst_is_user_agent()||burst_is_do_not_track()||(burst.tracking.isInitialHit?burst_track_hit():!e&&Date.now()-burst.tracking.lastUpdateTimestamp<300||(document.dispatchEvent(new CustomEvent("burst_before_update_hit",{detail:burst})),[e,r]=await Promise.all([burst_get_time_on_page(),t?Promise.all([burst_uid(),burst_fingerprint()]):(burst_use_cookies()?burst_uid:burst_fingerprint)()]),t={fingerprint:t?r[1]:!burst_use_cookies()&&r,uid:t?r[0]:!!burst_use_cookies()&&r,url:location.href,time_on_page:e,completed_goals:burst.goals.completed},(0{burst.options.track_url_change&&(burst.tracking.isInitialHit=!0,burst_track_hit())};!burst.options.enable_turbo_mode||"loading"!==document.readyState?burst_track_hit():document.addEventListener("load",burst_track_hit),document.addEventListener("visibilitychange",()=>{"hidden"!==document.visibilityState&&"unloaded"!==document.visibilityState||burst_update_hit()}),document.addEventListener("pagehide",()=>burst_update_hit()),document.addEventListener("click",t=>{let r=t.target.closest("a");r&&!burst.goals?.active?.some(e=>{if("clicks"!==e.type)return!1;if(!e.selector||""===e.selector.trim())return console.warn(e.selector,"does not exist"),!1;try{return r.closest(e.selector)}catch(t){return console.warn("Invalid selector for goal:",e.selector,t),!1}})&&burst_update_hit(!1,!1)},!0),document.addEventListener("burst_fire_hit",()=>burst_track_hit()),document.addEventListener("burst_enable_cookies",()=>{burst_enable_cookies(),burst_update_hit(!0)});let e=history.pushState,r=(history.pushState=function(){e.apply(this,arguments),t()},history.replaceState);history.replaceState=function(){r.apply(this,arguments),t()},window.addEventListener("popstate",t)}document.addEventListener("wp_listen_for_consent_change",t=>{"allow"===t.detail.statistics&&burst_init_events()}),"function"==typeof wp_has_consent&&!wp_has_consent("statistics")||burst_init_events(),window.burst_uid=burst_uid,window.burst_use_cookies=burst_use_cookies,window.burst_fingerprint=burst_fingerprint,window.burst_update_hit=burst_update_hit;